package student.stu23002103.chapter10;

import java.io.FileOutputStream;
import java.io.OutputStream;

public class Demo10 {
    public static void main(String[] args) throws Exception {
        // 创建一个文件字节输出流，并指定输出文件名称
        OutputStream out = new FileOutputStream("E:\\JAVA\\java202312\\src\\student\\stu23002103\\chapter10\\stu23002103.txt");
        String str = "itcast";
        byte[] b = str.getBytes();
        for (int i = 0; i < b.length; i++) {
            out.write(b[i]);
        }
        out.close();
    }
}

